package com.ruoyi.biz.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.biz.mapper.BizCatenarySwitchRecordMapper;
import com.ruoyi.biz.domain.BizCatenarySwitchRecord;
import com.ruoyi.biz.service.IBizCatenarySwitchRecordService;

/**
 * 接触网开关记录Service业务层处理
 * 
 * @author cc
 * @date 2025-11-15
 */
@Service
public class BizCatenarySwitchRecordServiceImpl implements IBizCatenarySwitchRecordService 
{
    @Autowired
    private BizCatenarySwitchRecordMapper bizCatenarySwitchRecordMapper;

    /**
     * 查询接触网开关记录
     * 
     * @param id 接触网开关记录主键
     * @return 接触网开关记录
     */
    @Override
    public BizCatenarySwitchRecord selectBizCatenarySwitchRecordById(Long id)
    {
        return bizCatenarySwitchRecordMapper.selectBizCatenarySwitchRecordById(id);
    }

    /**
     * 查询接触网开关记录列表
     * 
     * @param bizCatenarySwitchRecord 接触网开关记录
     * @return 接触网开关记录
     */
    @Override
    public List<BizCatenarySwitchRecord> selectBizCatenarySwitchRecordList(BizCatenarySwitchRecord bizCatenarySwitchRecord)
    {
        return bizCatenarySwitchRecordMapper.selectBizCatenarySwitchRecordList(bizCatenarySwitchRecord);
    }

    /**
     * 新增接触网开关记录
     * 
     * @param bizCatenarySwitchRecord 接触网开关记录
     * @return 结果
     */
    @Override
    public int insertBizCatenarySwitchRecord(BizCatenarySwitchRecord bizCatenarySwitchRecord)
    {
        bizCatenarySwitchRecord.setCreateTime(DateUtils.getNowDate());
        return bizCatenarySwitchRecordMapper.insertBizCatenarySwitchRecord(bizCatenarySwitchRecord);
    }

    /**
     * 修改接触网开关记录
     * 
     * @param bizCatenarySwitchRecord 接触网开关记录
     * @return 结果
     */
    @Override
    public int updateBizCatenarySwitchRecord(BizCatenarySwitchRecord bizCatenarySwitchRecord)
    {
        bizCatenarySwitchRecord.setUpdateTime(DateUtils.getNowDate());
        return bizCatenarySwitchRecordMapper.updateBizCatenarySwitchRecord(bizCatenarySwitchRecord);
    }

    /**
     * 批量删除接触网开关记录
     * 
     * @param ids 需要删除的接触网开关记录主键
     * @return 结果
     */
    @Override
    public int deleteBizCatenarySwitchRecordByIds(Long[] ids)
    {
        return bizCatenarySwitchRecordMapper.deleteBizCatenarySwitchRecordByIds(ids);
    }

    /**
     * 删除接触网开关记录信息
     * 
     * @param id 接触网开关记录主键
     * @return 结果
     */
    @Override
    public int deleteBizCatenarySwitchRecordById(Long id)
    {
        return bizCatenarySwitchRecordMapper.deleteBizCatenarySwitchRecordById(id);
    }
}
